{{define "title"}}Configs{{end}}

{{define "body"}}
<div class="header">
  <a href="{{ .Navi.SiteTitle.URL }}">{{ .Navi.SiteTitle.Label }}</a>
</div>
<div class="content">
  <h1>All Consoles</h1>
  {{ range .Consoles }}
    <h3>
      <a href="/console/{{.GetProjectID}}/{{.ID}}">
        {{ .GetProjectID }} / {{ .ID }}
      </a>
    </h3>
    <p> <b>Repo</b>: {{ .RepoURL }} </p>
    {{ range .Refs }}
      <p> <b>Refs</b>: {{ . }} </p>
    {{ end }}
    <p> <b>Manifest Name</b>: {{ .ManifestName }} </p>
    <p> <b>URL</b>: {{ .URL }} </p>
    <p> <b>Revision</b>: {{ .Revision }} </p>
    <ul>{{ range .Builders }}<li>{{ . }}</li>{{ end }}</ul>
  {{ else }}
    <h4> No consoles defined </h4>
  {{ end }}

  <h1>Service Configs</h1>
  <h2>These are settings tied to this instance of Milo</h2>
  {{ if not .ServiceConfig }}
    <h3>No Settings found...</h3>
  {{ else }}
    <ul>
      <li> Revision: {{ .ServiceConfig.Revision }} </li>
      <li> Last Updated: {{ .ServiceConfig.LastUpdated | localTime "N/A" }} </li>
    </ul>
    Content:
    <pre>{{ .ServiceConfig.Text }}</pre>
  {{ end }}
</div>
{{end}}
